package com.jiuwan.gamepass.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

/**
 * @version 1.0
 * 功能目的描述 ：用于    redis配置类  ========>>>>>>>>>>>
 * @author： pang-yun
 * @date： 2021-07-01 14:31
 */
@Configuration
public class RedisConfig {
/*
    @Bean
    public RedisTemplate<String, Object> redisTemplate() {
        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
        //String key 序列化
        redisTemplate.setKeySerializer(new StringRedisSerializer());
        // String value  序列化
        redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
        //Hash  key 序列化
        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
        // Hash value  序列化
        redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());

        return redisTemplate;

    }*/
}
